<?php
	$title = "RRR Home Page";

$optionalcss =
    '<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="coin-slider.min.js"></script>
<link rel="stylesheet" href="coin-slider-styles.css" type="text/css" />';
	include('header.php');
?>
		<!-- THIS IS A SAMPLE OF WHAT A PAGE WILL BE
			NEEDS:
				TITLE
				HEADER
				CONTENT -BODY OF EVERYTHING
				FOOTER (RIGHT DIV AND FOOTER NAV)
		-->
		<!-- start content -->
		
		<div id="content">
			<div class="post">
				<h1 class="title"><a href="#">Welcome to Our Website!</a></h1>
		
				<div class="entry">
					<p>Welcome to our CS3380 group project website!  Here you can find and post reviews about all your favorite movies.  Not 
					sure what to watch this weekend?  Browse our reviews, see other user ratings, and find details about your movie.  
					Don't see a movie?  Start your own review!</p>
				</div>
			</div>

			<div class="post">
                                <h1 class="title">Browse Our Newest Movies</h1><br />
                                <div class="entry">
                                        <!--<p class="links"><a href="#" class="more">Read More</a></p>-->
					<center>                      			
                                        <div id='coin-slider'>
					<?php
						include 'std_dbs.php';

						$query = "SELECT IMGCOVER, MOVTITLE, DATEACCEPTED FROM MOVIES WHERE PENDSTATUS = 0 ORDER BY DATEACCEPTED DESC";
						$stid = oci_parse($connect, $query);
						oci_execute($stid);

						//print picture and information
						while($row = oci_fetch_array($stid, OCI_ASSOC))
                                                	echo "<a href='movies.php?movie=".$row['MOVTITLE']."'>
                                                        	<img src='content/covers/".$row['IMGCOVER']."' ><br />
                                                        	<span>".$row['MOVTITLE']."</span></a>";
                                        ?>
					</div>
					</center>
					
                                        <script type="text/javascript">
                                                $(document).ready(function() {
                                                        $('#coin-slider').coinslider({width:220, height:326});
                                                });
                                        </script>
                                </div>
			</div>
		</div>

<?php include('footer.php'); ?>
